<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>物理实验模拟系统</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        :root {
            /* MD3 颜色系统 - Light主题 */
            --md-sys-color-primary: #6750A4;
            --md-sys-color-on-primary: #FFFFFF;
            --md-sys-color-primary-container: #EADDFF;
            --md-sys-color-on-primary-container: #21005E;
            --md-sys-color-secondary: #625B71;
            --md-sys-color-on-secondary: #FFFFFF;
            --md-sys-color-secondary-container: #E8DEF8;
            --md-sys-color-on-secondary-container: #1E192B;
            --md-sys-color-tertiary: #7D5260;
            --md-sys-color-on-tertiary: #FFFFFF;
            --md-sys-color-tertiary-container: #FFD8E4;
            --md-sys-color-on-tertiary-container: #370B1E;
            --md-sys-color-error: #B3261E;
            --md-sys-color-on-error: #FFFFFF;
            --md-sys-color-error-container: #F9DEDC;
            --md-sys-color-on-error-container: #370B1E;
            --md-sys-color-background: #FFFBFE;
            --md-sys-color-on-background: #1C1B1F;
            --md-sys-color-surface: #FFFBFE;
            --md-sys-color-on-surface: #1C1B1F;
            --md-sys-color-surface-variant: #E7E0EC;
            --md-sys-color-on-surface-variant: #49454F;
            --md-sys-color-outline: #79747E;
            --md-sys-color-outline-variant: #C4C7C5;
            --md-sys-color-shadow: #000000;
            --md-sys-color-scrim: #000000;
            --md-sys-color-inverse-surface: #313033;
            --md-sys-color-inverse-on-surface: #F4EFF4;
            --md-sys-color-inverse-primary: #D0BCFF;
            
            /* 圆角 */
            --md-sys-shape-corner-small: 8px;
            --md-sys-shape-corner-medium: 12px;
            --md-sys-shape-corner-large: 16px;
            --md-sys-shape-corner-extra-large: 28px;
            
            /* 阴影 */
            --md-sys-elevation-1: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15);
            --md-sys-elevation-2: 0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15);
            --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3);
        }
        
        body {
            font-family: 'Roboto', sans-serif;
            background-color: var(--md-sys-color-background);
            color: var(--md-sys-color-on-background);
            margin: 0;
            padding: 0;
        }
        
        .container {
            max-width: 1200px;
        }
        
        .md3-card {
            background-color: var(--md-sys-color-surface);
            border-radius: var(--md-sys-shape-corner-large);
            box-shadow: var(--md-sys-elevation-1);
            border: none;
            transition: box-shadow 0.3s, transform 0.3s;
            overflow: hidden;
            height: 100%;
        }
        
        .md3-card:hover {
            box-shadow: var(--md-sys-elevation-3);
            transform: translateY(-5px);
        }
        
        .md3-card .card-body {
            padding: 24px;
        }
        
        .md3-card .card-title {
            color: var(--md-sys-color-on-surface);
            font-weight: 500;
            margin-bottom: 16px;
            font-size: 1.5rem;
        }
        
        .md3-card .card-text {
            color: var(--md-sys-color-on-surface-variant);
            font-size: 0.875rem;
            line-height: 1.5;
        }
        
        .experiment-icon-wrapper {
            background-color: var(--md-sys-color-primary-container);
            width: 56px;
            height: 56px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }
        
        .experiment-icon {
            color: var(--md-sys-color-on-primary-container);
            width: 32px;
            height: 32px;
        }
        
        .md3-btn {
            display: inline-block;
            height: 40px;
            padding: 0 24px;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 500;
            letter-spacing: 0.1px;
            text-transform: uppercase;
            line-height: 40px;
            cursor: pointer;
            text-decoration: none;
            text-align: center;
            transition: background-color 0.2s;
            border: none;
            margin-top: 16px;
        }
        
        .md3-btn-primary {
            background-color: var(--md-sys-color-primary);
            color: var(--md-sys-color-on-primary);
        }
        
        .md3-btn-primary:hover {
            background-color: var(--md-sys-color-primary);
            opacity: 0.9;
            color: var(--md-sys-color-on-primary);
        }
        
        .md3-btn-secondary {
            background-color: var(--md-sys-color-secondary-container);
            color: var(--md-sys-color-on-secondary-container);
        }
        
        .md3-btn-secondary:hover {
            background-color: var(--md-sys-color-secondary-container);
            opacity: 0.9;
            color: var(--md-sys-color-on-secondary-container);
        }
        
        .intro-section {
            background-color: var(--md-sys-color-primary-container);
            border-radius: var(--md-sys-shape-corner-large);
            padding: 32px;
            margin-bottom: 48px;
            box-shadow: var(--md-sys-elevation-1);
        }
        
        .intro-section h1 {
            color: var(--md-sys-color-on-primary-container);
            font-weight: 500;
            margin-bottom: 16px;
            font-size: 2.5rem;
        }
        
        .intro-section p {
            color: var(--md-sys-color-on-primary-container);
            font-size: 1.1rem;
            line-height: 1.6;
            opacity: 0.85;
        }
        
        .intro-highlight {
            font-weight: 500;
            color: var(--md-sys-color-primary);
        }
        
        .footer-text {
            color: var(--md-sys-color-on-surface-variant);
            font-size: 0.875rem;
        }
    </style>
</head>
<body>
    <div class="container mt-5">
        <div class="intro-section text-center">
            <h1>高中物理可视化教学平台</h1>
            <p class="mb-0">通过<span class="intro-highlight">交互式动画模拟</span>，深入理解物理概念和原理</p>
            <p class="mt-4">本平台提供多个经典物理现象的可视化模拟，帮助学生直观地理解抽象概念，培养物理直觉和科学思维。</p>
        </div>
        
        <div class="row row-cols-1 row-cols-md-2 g-4">
            <!-- 动量守恒实验 -->
            <div class="col">
                <div class="card md3-card h-100">
                    <div class="card-body">
                        <div class="experiment-icon-wrapper">
                            <svg class="experiment-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
                                <circle cx="10" cy="16" r="5"/>
                                <circle cx="22" cy="16" r="5"/>
                                <path d="M15 16 L17 16 M10 16 L14 16 M22 16 L18 16" stroke="currentColor" stroke-width="1.5" fill="none"/>
                                <path d="M13 14 L15 16 L13 18" stroke="currentColor" stroke-width="1.5" fill="none"/>
                                <path d="M19 14 L17 16 L19 18" stroke="currentColor" stroke-width="1.5" fill="none"/>
                            </svg>
                        </div>
                        <h2 class="card-title">动量守恒实验</h2>
                        <p class="card-text">探索完全弹性碰撞中的动量守恒定律，通过可视化模拟了解动量在碰撞过程中的传递和守恒。</p>
                        <a href="/momentum-intro" class="md3-btn md3-btn-primary">开始实验</a>
                    </div>
                </div>
            </div>

            <!-- 斜坡运动实验 -->
            <div class="col">
                <div class="card md3-card h-100">
                    <div class="card-body">
                        <div class="experiment-icon-wrapper">
                            <svg class="experiment-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
                                <path d="M4 24 L28 24 L28 26 L4 26 Z"/> <!-- Base -->
                                <path d="M6 24 L18 8 L20 8 L8 24 Z"/> <!-- Ramp -->
                                <rect x="13" y="10" width="6" height="6" transform="rotate(-35 16 13)"/> <!-- Block -->
                            </svg>
                        </div>
                        <h2 class="card-title">斜坡运动实验</h2>
                        <p class="card-text">研究物体在斜面上的运动规律，分析重力分量、摩擦力等因素对物体运动的影响。</p>
                        <a href="/ramp-intro" class="md3-btn md3-btn-primary">开始实验</a>
                    </div>
                </div>
            </div>

            <!-- 杠杆原理实验 -->
            <div class="col">
                <div class="card md3-card h-100">
                    <div class="card-body">
                        <div class="experiment-icon-wrapper">
                            <svg class="experiment-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
                                <path d="M4 18 L28 18 L28 20 L4 20 Z"/> <!-- Lever bar -->
                                <path d="M14 21 L18 21 L16 25 Z"/> <!-- Fulcrum -->
                                <rect x="6" y="12" width="4" height="6"/> <!-- Weight 1 -->
                                <rect x="22" y="14" width="4" height="4"/> <!-- Weight 2 -->
                            </svg>
                        </div>
                        <h2 class="card-title">杠杆原理实验</h2>
                        <p class="card-text">探索杠杆原理和力矩平衡，了解力臂、力矩和机械优势之间的关系。</p>
                        <a href="/lever-intro" class="md3-btn md3-btn-primary">开始实验</a>
                    </div>
                </div>
            </div>

            <!-- 自由落体实验 -->
            <div class="col">
                <div class="card md3-card h-100">
                    <div class="card-body">
                        <div class="experiment-icon-wrapper">
                            <svg class="experiment-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
                                <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-4.42 3.58-8 8-8 4.42 0 8 3.58 8 8 0 4.42-3.58 8-8 8z"/>
                                <path d="M12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/>
                                <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/>
                            </svg>
                        </div>
                        <h2 class="card-title">自由落体实验</h2>
                        <p class="card-text">研究物体在重力作用下的运动，考虑空气阻力影响下的终端速度现象。</p>
                        <a href="/freefall-intro" class="md3-btn md3-btn-primary">开始实验</a>
                    </div>
                </div>
            </div>
        </div>

        <div class="text-center my-5">
            <p class="footer-text">每个实验都配有详细的原理说明、数学模型和应用场景介绍</p>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>